package cn.ainit.fx.hkjh;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.ainit.sys.menu.SessionCont;

@Controller
@RequestMapping("hkjh")
public class FxhkjhController {
	private FxhkjhService fxhkjhService;

	@Resource
	public void setFxhkjhService(FxhkjhService fxhkjhService) {
		this.fxhkjhService = fxhkjhService;
	}

	/**
	 * 
	 * @Title: addHKJHMainTable
	 * @author : FuXiangYi  
	 * @Description: 添加主表信息
	 * @param hp
	 * @return    
	 * @return String 
	 * @date 2014-12-8 下午04:48:27
	 */
	@RequestMapping("addMainTable")
	@ResponseBody
	public HKJHParam addHKJHMainTable(HKJHParam hp,HttpSession session){
		hp.setSalesman(session.getAttribute(SessionCont.uid).toString());
		hp=fxhkjhService.addHkjhMain(hp);
		return hp;
		
	}
	
	@RequestMapping("addDetail")
	@ResponseBody
	public String addHKJHDetailClient(HKJHParam hp){
		hp =fxhkjhService.addhkjhDetailClientService(hp);
		
		return null;
	}
	
	
}
